package com.feeyo.groundservice.ws.monitor

import okhttp3.Response

/**
 *可用于监听ws连接状态并进一步拓展
 */
interface WebSocketStatusListener {

    /**连接成功**/
    fun onOpen(response: Response)

    /**重连**/
    fun onReconnect()

    /**重连成功**/
    fun onReconnectSuccess()

    fun onReconnectException(cause:String)

    fun onFailure( t: Throwable, response: Response?)

    fun onClosing(cause: String)

    fun onClosed(cause: String)
}
